package com.primb.bench.project.home.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Chen on 2017/5/9.
 * 功能描述：贷款测算客户信息实体类
 */

public class ClientInfoEntity implements Parcelable {

    /**
     * 客户基本信息
     */
    String customerName = "";//客户名称
    String customerNum = "";//客户编号
    String customerNumM = "";//母公司客户编号
    String customerType = "";//客户类型
    String customerTypeId = "";//客户类型id
    String customerCredit = "";//客户信用等级
    String customerCreditId = "";//客户信用等级id
    String customerSize = "";//客户规模
    String customerSizeId = "";//客户规模id
    String customerAllContribution = "0";//累积贡献点
    String customerUsedContribution = "0";//已使用贡献点
    String customerUsedContributionM = "0";//母公司已使用贡献点
    String customerContributionNum = "0";//剩余贡献点
    String customerContributionNumM = "0";//母公司剩余贡献点
    String customerIsContribution = "0";//是否使用贡献点
    String customerIsContributionM = "0";//是否使用贡献点
    String customerAllProfit = "0";//累积毛利润
    String customerAdjustRate = "0";//违约概率调整
    boolean isCustomerInfoEmpty = true;

    public String getCustomerIsContributionM() {
        return customerIsContributionM;
    }

    public void setCustomerIsContributionM(String customerIsContributionM) {
        if (!customerIsContributionM.equals(""))
            this.customerIsContributionM = customerIsContributionM;
    }

    public String getCustomerNumM() {
        return customerNumM;
    }

    public void setCustomerNumM(String customerNumM) {
        if (!customerNumM.equals(""))
            this.customerNumM = customerNumM;
    }

    public String getCustomerUsedContributionM() {
        return customerUsedContributionM;
    }

    public void setCustomerUsedContributionM(String customerUsedContributionM) {
        if (!customerUsedContributionM.equals(""))
            this.customerUsedContributionM = customerUsedContributionM;
    }

    public String getCustomerContributionNumM() {
        return customerContributionNumM;
    }

    public void setCustomerContributionNumM(String customerContributionNumM) {
        if (!customerContributionNumM.equals(""))
            this.customerContributionNumM = customerContributionNumM;
    }

    public String getCustomerTypeId() {
        return customerTypeId;
    }

    public void setCustomerTypeId(String customerTypeId) {
        this.customerTypeId = customerTypeId;
    }

    public String getCustomerCreditId() {
        return customerCreditId;
    }

    public void setCustomerCreditId(String customerCreditId) {
        this.customerCreditId = customerCreditId;
    }

    public String getCustomerSizeId() {
        return customerSizeId;
    }

    public void setCustomerSizeId(String customerSizeId) {
        this.customerSizeId = customerSizeId;
    }

    public String getCustomerAllContribution() {
        return customerAllContribution;
    }

    public void setCustomerAllContribution(String customerAllContribution) {
        if (!customerAllContribution.equals(""))
            this.customerAllContribution = customerAllContribution;
    }

    public String getCustomerUsedContribution() {
        return customerUsedContribution;
    }

    public void setCustomerUsedContribution(String customerUsedContribution) {
        if (!customerUsedContribution.equals(""))
            this.customerUsedContribution = customerUsedContribution;
    }

    public String getCustomerIsContribution() {
        return customerIsContribution;
    }

    public void setCustomerIsContribution(String customerIsContribution) {
        if (!customerIsContribution.equals(""))
            this.customerIsContribution = customerIsContribution;
    }

    public String getCustomerAllProfit() {
        return customerAllProfit;
    }

    public void setCustomerAllProfit(String customerAllProfit) {
        this.customerAllProfit = customerAllProfit;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerNum() {
        return customerNum;
    }

    public void setCustomerNum(String customerNum) {
        this.customerNum = customerNum;
    }

    public String getCustomerType() {
        return customerType;
    }

    public void setCustomerType(String customerType) {
        this.customerType = customerType;
    }

    public String getCustomerCredit() {
        return customerCredit;
    }

    public void setCustomerCredit(String customerCredit) {
        this.customerCredit = customerCredit;
    }

    public String getCustomerSize() {
        return customerSize;
    }

    public void setCustomerSize(String customerSize) {
        this.customerSize = customerSize;
    }

    public String getCustomerContributionNum() {
        return customerContributionNum;
    }

    public void setCustomerContributionNum(String customerContributionNum) {
        if (!customerContributionNum.equals(""))
            this.customerContributionNum = customerContributionNum;
    }

    public String getCustomerAdjustRate() {
        return customerAdjustRate;
    }

    public void setCustomerAdjustRate(String customerAdjustRate) {
        if (!customerAdjustRate.equals(""))
            this.customerAdjustRate = customerAdjustRate;
    }

    public boolean isCustomerInfoEmpty() {
        return isCustomerInfoEmpty;
    }

    public void setCustomerInfoEmpty(boolean customerInfoEmpty) {
        isCustomerInfoEmpty = customerInfoEmpty;
    }

    public ClientInfoEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.customerName);
        dest.writeString(this.customerNum);
        dest.writeString(this.customerNumM);
        dest.writeString(this.customerType);
        dest.writeString(this.customerTypeId);
        dest.writeString(this.customerCredit);
        dest.writeString(this.customerCreditId);
        dest.writeString(this.customerSize);
        dest.writeString(this.customerSizeId);
        dest.writeString(this.customerAllContribution);
        dest.writeString(this.customerUsedContribution);
        dest.writeString(this.customerUsedContributionM);
        dest.writeString(this.customerContributionNum);
        dest.writeString(this.customerContributionNumM);
        dest.writeString(this.customerIsContribution);
        dest.writeString(this.customerIsContributionM);
        dest.writeString(this.customerAllProfit);
        dest.writeString(this.customerAdjustRate);
        dest.writeByte(this.isCustomerInfoEmpty ? (byte) 1 : (byte) 0);
    }

    protected ClientInfoEntity(Parcel in) {
        this.customerName = in.readString();
        this.customerNum = in.readString();
        this.customerNumM = in.readString();
        this.customerType = in.readString();
        this.customerTypeId = in.readString();
        this.customerCredit = in.readString();
        this.customerCreditId = in.readString();
        this.customerSize = in.readString();
        this.customerSizeId = in.readString();
        this.customerAllContribution = in.readString();
        this.customerUsedContribution = in.readString();
        this.customerUsedContributionM = in.readString();
        this.customerContributionNum = in.readString();
        this.customerContributionNumM = in.readString();
        this.customerIsContribution = in.readString();
        this.customerIsContributionM = in.readString();
        this.customerAllProfit = in.readString();
        this.customerAdjustRate = in.readString();
        this.isCustomerInfoEmpty = in.readByte() != 0;
    }

    public static final Creator<ClientInfoEntity> CREATOR = new Creator<ClientInfoEntity>() {
        @Override
        public ClientInfoEntity createFromParcel(Parcel source) {
            return new ClientInfoEntity(source);
        }

        @Override
        public ClientInfoEntity[] newArray(int size) {
            return new ClientInfoEntity[size];
        }
    };

}
